package org.keum.android.lecture;

import java.util.Date;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class NowRedux extends Activity implements View.OnClickListener {
	Button btn;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.nowredux);
		btn = (Button)findViewById(R.id.button);
		btn.setOnClickListener(this);
		updateTime();
	}

	private void updateTime() {
		btn.setText(new Date().toLocaleString());
	}

	public void onClick(View arg0) {
		updateTime();
	}

}
